/*
*   Copyright: Fabian Hajek (2012)  Programmieren: C   -   Semesterarbeit WS 2011/2012
*
*   Projekt: Schreinerei.exe
*
*   Author: $Author: webmaster@die-schwarzen-schwaben.de $
*
*   Name: structures.h
*   URL:    $URL: http://semesterarbeit-wi-11-12.googlecode.com/svn/trunk/Semesterarbeit2/Schreinerei/default/structures.h $
*
*   Description:   Beinhaltet die Strukturen und Variablen-Deklaration fuer benoetigte Funktionen
*   Last update:    $Date: 2012-02-24 21:43:11 +0000 (Fri, 24 Feb 2012) $
*
*   Rev:      $Rev: 55 $
*/
#include "../Definitionen/define.h"
#ifndef STRUCTURES_H_INCLUDED
#define STRUCTURES_H_INCLUDED

/*ERSTELLE DEFAULT-STRUCTURES*/
/*char *p_step_array = values_step();
char *p_schrank_array = values_schrank();
*/
/*START DEFAULT-Values Funktionen*/
struct schrank* values_schrank(void);
struct schrank *p_schrank;
struct schrank *p_schrank_prev;
//struct schrank *p_struct_schrank[];


struct ressource* values_ressource(void);
struct ressource *p_ressource;
struct ressource *p_ressource_prev;
//struct ressource *p_struct_ressource[];


struct step *values_step(void);
struct step *p_step;
struct step *p_step_prev;
//struct step *p_struct_step[];

struct order *p_order;


/*END Funktionen*/
struct schrank
{
    char name[30];
    RESSOURCE *p_ressources[MAX_SCHRANK_RESOURCE];     /*MAXIMALE Anzahl fuer Ressourcen*/
    int ressources_quantity[MAX_SCHRANK_RESOURCE];
    STEP *p_steps[MAX_SCHRANK_RESOURCE];                /*MAXIMALE Anzahl fuer Ressourcen == MAXIMALE Anzahl an Arbeitsschritten*/
    int steps_quantity[MAX_SCHRANK_RESOURCE];
    struct schrank *next_schrank;
    struct schrank *prev_schrank;
};

struct ressource
{
    char name[30];                          /*Name der Ressource [Holz]*/
    float price;                            /*Preis*/
    char entity;                            /*Einheit*/
    unsigned int stock;                     /*Lagerbestand*/
    struct ressource *next_ressource;
    struct ressource *prev_ressource;
};

struct step
{
    char name[30];                          /*Name des Arbeitsschrittes*/
    struct ressource *p_ressources;         /*Pointer auf die Ressource*/
    //int verbrauch;                        /*Wieviele Einheiten Ressourcen werden fuer diesen Schritt benoetigt?*/
    float time;                             /*Dauer des Arbeitsschrittes*/
    float price;                            /*Kosten fuer den Arbeitsschritt*/
    unsigned char ressource[30];
    struct step *next_step;                /*Pointer auf "naechsten" Schritt*/
    struct step *prev_step;
};

struct order
{
    SCHRANK *id;
    float status;
    float steps_quantity;
    struct order *next_order;
};
#endif // STRUCTURES_H_INCLUDED
